package com.jiaquyun.jcyx.entity

import com.blankj.utilcode.util.GsonUtils
import com.google.gson.Gson
import com.module.lemlin.http.HttpResponseData
import java.io.Serializable

data class SmsResponse(
    val data: SmsEntity
) : HttpResponseData()

data class SmsEntity(
    val is_new: Boolean
)

data class LoginResponse(
    val data: LoginEntity
) : HttpResponseData()

data class LoginEntity(
    val isNew: Boolean,
    val userinfo: UserInfo
)

data class UserInfo(
    val avatar: String,
    val card_type: String,
    val chat_id: String,
    val createtime: Int,
    val expires_in: Int,
    val expiretime: Int,
    val id: Int,
    val is_new: Int,
    val mobile: String,
    val money: String,
    val nickname: String,
    val token: String,
    val user_id: Int
) : Serializable {
    override fun toString(): String {
        return GsonUtils.toJson(this)
    }
}

data class CollectGoodsResponse(
    val data: MutableList<CollectGoods> = mutableListOf()
) : HttpResponseData() {
    var loadMore = false
}

data class CollectGoods(
    var cart_id: Int,
    var cart_num: Int,
    val goods: CollectGoodsList,
    val goods_id: Int,
    val id: Int,
    val type: Int
)

data class CollectGoodsList(
    val active_type: Int,
    val end_time: Any,
    val goods_name: String,
    val guidance_price: String,
    val id: Int,
    val image: String,
    val is_recommend: String,
    val price: String,
    val sales_sum: Int,
    val send_time: Any,
    val shop_count: Int,
    val start_time: Any
)

data class PurchaseGoodsResponse(
    val data: MutableList<PurchaseGoods> = mutableListOf()
) : HttpResponseData() {
    var loadMore = false
}

data class PurchaseGoods(
    val goods_id: Int?,
    val goods_name: String,
    val goods_num: Int,
    val guidance_price: String?,
    val image: String?,
    val price: String?
)

data class UserIndexResponse(
    val data: UserIndex
) : HttpResponseData()

data class UserIndex(
    val coupon_count: Int,
    val userInfo: UserInfo2,
    val wait_pay: Int,
    val wait_receive: Int,
    val wait_send: Int
) : Serializable {
    override fun toString(): String {
        return GsonUtils.toJson(this)
    }
}

data class UserInfo2(
    val area: String,
    val avatar: String,
    val birthday: Any,
    val card_type: String,
    val city: Int,
    val district: Int,
    val gender: String,
    val id: Int,
    val mobile: String,
    val money: String,
    val nickname: String,
    val province: Int,
    val score: Int,
    val user_card: UserCard,
    val vip_end_date: String,
    val commission_money: String
)

data class UserCard(
    val image: Any,
    val name: Any
)


data class UserShopsResponse(
    val data: MutableList<UserShops> = mutableListOf()
) : HttpResponseData()

data class UserShops(
    val address: String,
    val auto_cancel: Int,
    val distance: Double,
    val id: Int,
    val is_delivery: Int,
    val lat: String,
    val lng: String,
    val mobile: String,
    val shop_name: String
) : Serializable {
    override fun toString(): String {
        return GsonUtils.toJson(this)
    }
}

data class UserSignListResponse(
    val data: UserSign
) : HttpResponseData()

data class UserSign(
    val score_reward_day: String,
    val score_reward_order: MutableList<Any> = mutableListOf(),
    val score_rule_text: MutableList<String> = mutableListOf(),
    val sign: MutableList<Sign> = mutableListOf()
)

data class Sign(
    var createtime: Long? = null,
    var createtime_text: String? = null,
    var id: Int? = null,
    var score: Int? = null,
    var successions: Int? = null,
    var type: Int? = null,
    var user_id: Int? = null,
    var week_successions: Int? = null
) {
    var name: String? = null
}


data class UserScoreResponse(
    val data: MutableList<UserScore> = mutableListOf()
) : HttpResponseData() {
    var loadMore = false
}

data class UserScore(
    val createtime: String,
    val memo: String,
    val score: Int,
    val type: Int,
    val type_text: String
)


data class CouponListResponse(
    val data: MutableList<CouponList> = mutableListOf()
) : HttpResponseData() {
    var loadMore = false
}

data class CouponList(
    val condition: String,
    val end_time: String,
    val id: Int,
    val money: String,
    val name: String,
    val send_time_text: String,
    val start_time: String,
    val status: Int,
    val user_type_text: String
)


data class UserMoneyLogResponse(
    val data: MutableList<UserMoneyLog> = mutableListOf()
) : HttpResponseData() {
    var loadMore = false
}

data class UserMoneyLog(
    val createtime: String,
    val memo: String,
    val money: String
)


data class UserYongLogResponse(
    val data: MutableList<UserYongLog> = mutableListOf()
) : HttpResponseData() {
    var loadMore = false
}

data class UserYongLog(
    val id: Int,
    val source_type: Int,
    val source_id: Int,
    val user_id: Int,
    val createtime: String,
    val before: String,
    val money: String,
    val after: String,
    val remark: String
)

data class UserInvoiceHistoryResponse(
    val data: MutableList<UserInvoiceHistory> = mutableListOf()
) : HttpResponseData() {
    var loadMore = false
}

data class UserInvoiceHistory(
    val createtime: Long,
    val id: Int,
    val invoice_money: String,
    val invoice_no: String,
    val status: Int,
    val user_id: Int
)

data class UserInvoiceOrderResponse(
    val data: MutableList<UserInvoiceOrder> = mutableListOf()
) : HttpResponseData() {
    var loadMore = false
}

data class UserInvoiceOrder(
    val createtime: String,
    val deal_type: Int,
    val id: Int,
    val order_amount: String,
    val order_goods: MutableList<OrderGood> = mutableListOf(),
    val order_sn: String,
    val order_status: String,
    val shipping_status: String
) {
    var isSelected: Boolean = false
}

data class UserInvoiceCreate(
    val invoice_no: String,
    val invoice_title: String,
    val order_id: IntArray,
    val shop_id: Int
)

data class UserInvoiceQueryResponse(
    val data: UserInvoiceQuery
) : HttpResponseData()

data class UserInvoiceQuery(
    val createtime: Long,
    val download_url: String,
    val id: Int,
    val invoice_code: String,
    val invoice_money: String,
    val invoice_no: String,
    val invoice_number: Int,
    val invoice_title: String,
    val pdf_url: String,
    val status: Int,
    val user_id: Int
) : Serializable
